from rest_framework import serializers
from file.models import *


class FileSerializer(serializers.ModelSerializer):
    """文件序列化"""
    class Meta:
        model = File
        fields = ('id', 'file', 'create_at', 'owner_id')


class ArticleSerializer(serializers.ModelSerializer):
    """文章序列化"""
    class Meta:
        model = Article
        fields = '__all__'
